package com.xbongbong.paas.pojo.workflow.settings.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.workflow.pojo.nodes.WorkflowNodePojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
 * @author 吴峰
 * @date 2021/05/12 9:39
 */
@Getter
@Setter
@ToString
public class WorkflowNodeSaveDTO extends BaseDTO {
    private static final long serialVersionUID = -5535762645735056705L;

    /**
     * 工作流节点id，为null则是新建节点，不为null则为更新
     */
    @NotNull(message = "{dto.msg.workflowId.NotNull}")
    private Long workflowId;

    private Long workflowNodeId;
    /**
     * @see com.xbongbong.workflow.config.enums.WorkflowTriggerMethodEnum
     */
    private Integer type;

    /**
     * 左移：1 右移：2 或者 不移动:0
     */
    private Integer move;

    /**
     * 触发节点名称
     */
    @Valid
    @NotNull(message = "{dto.msg.WorkflowNodeSaveDTO.workflowNode.NotNull}")
    private WorkflowNodePojo workflowNode;

}
